import request2 from '@/utils/request2'
import request1 from '@/utils/request'

const baseURL='/devices';
const baseURL2='http://localhost:8183'

export default {
  getListByCondition3(param){
    return request2.get(baseURL2+'/devices/findAll/'+param.page+'/'+param.pageSize)
  },
  handleAdd(param){
    return request2.post('http://localhost:8183/devices/save',param)
  }
}

export function getListByCondition2(param) {
  return request2({
    method: 'get',
    url: baseURL2+'/devices/findAll/'+param.page+'/'+param.pageSize,
    /* url:'http://localhost:8183/devices/findAll/1/10'表示希望传过来的数据是1页有10条数据。
        除此之外，还有findAll/1/5  findAll/1/20  findAll/1/30  findAll/1/50
     */
  })
}
export function getListByCondition3(param) {
  return request2({
    method: 'post',
    url: 'http://localhost:8080/ssm/basic/query',
    data:param
    /* url:'http://localhost:8183/devices/findAll/1/10'表示希望传过来的数据是1页有10条数据。
        除此之外，还有findAll/1/5  findAll/1/20  findAll/1/30  findAll/1/50
     */
  })
}
/*
export function getListByCondition(param) {
  return request({
    // url: '/vue-admin-template/user/login.\*',
    method: 'get',
    url: baseURL+'/getListByCondition',
    params:param//对应处为query
  })
}

export function update(param){
  return request({
    // url: '/vue-admin-template/user/login',
    method: 'put',
    url: baseURL+'/put',
    data: param//对应处为body

  })
}

export function add(param) {
  return request({
    // url: '/vue-admin-template/user/login',
    method: 'post',
    url: baseURL+'/add',
    data:param,//对应处是body
  })
}

export function deleteDevice(param){
  return request({

    method: 'delete',
    url: baseURL+'/delete',
    params:{
      index:param
    }
  })
}
*/
